
package com.feib.soeasy.job.dao;

import java.util.Date;
import java.util.List;

import com.feib.soeasy.model.ColumnValidateError;
import com.feib.soeasy.model.Group;
import com.feib.soeasy.model.MailQueue;
import com.feib.soeasy.model.Payment;
import com.feib.soeasy.model.UploadFile;


/**
 * @title (#)ImportDao.java<br>
 * @description <br>
 * @author Jimmy Liu<br>
 * @version 1.0.0 2010/11/25
 * @copyright Far Eastern International Bank Copyright (c) 2010<br>
 * @2010/12/3 create by Jimmy Liu<br>
 */
public interface ImportDao {
    /**
     * @param uploadFilePk
     * @return
     */
    public UploadFile queryUploadFileByPk(Long uploadFilePk);

    /**
     * @return
     */
    public UploadFile queryFirstUnCheckUploadFile();

    /**
     * @param uploadFile
     */
    public void updateUploadFileStatus(UploadFile uploadFile);

    /**
     * @param uploadFile
     */
    public void deletePaymentsByUploadFile(UploadFile uploadFile);

    /**
     * @param payments
     */
    public void addPayments(List<Payment> payments);

    /**
     * @param columnValidateErrors
     */
    public void addColumnValidateErrors(List<ColumnValidateError> columnValidateErrors);

    /**
     * 檢查繳費帳號是否重複
     * @param virtualAccount 虛擬帳號
     * @param payDue 繳費期限
     * @return
     */
    public boolean isDuplicateVirtualAccount(String virtualAccount, Date payDue);

    /**
     * 取得錯誤原因
     * @param uploadFile
     * @return
     */
    public List<ColumnValidateError> getColumnValidateErrors(UploadFile uploadFile);

    /**
     * @param mailQueue
     * @return
     */
    public MailQueue addMailQueue(MailQueue mailQueue);
    
    public List<String> getConfirmUserEmail(Group group);

    /**
     * 更新總筆數，總金額
     * @param uploadFile
     */
    public void updateUploadFileTotals(UploadFile uploadFile);
}
